package com.yty.product.client;

import com.yty.product.apidata.OrderDetailInput;
import com.yty.product.apidata.ProductInfoOutput;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient("product")
public interface ProductClient {
    @PostMapping("product/decreaseStock")
    void decreaseStock(@RequestBody List<OrderDetailInput> orderDetailInputs);

    @PostMapping("product/listForOrder")
    List<ProductInfoOutput> listForOrder(@RequestBody List<String> productIds);

    @GetMapping("test/msg")
    String msg();
}
